<?php
include "conexao.php";
$l = $_POST['label'];
//echo $l;
$y = mysql_query("SELECT v.ytid FROM video v WHERE v.vdlabel = '$l'");
$div = "<h4>Ultimos Videos</h4>";
while($row = mysql_fetch_array($y)){
	$vd = mysql_query("SELECT v.vdtitulo, v.vdlabel FROM video v WHERE v.ytid = ".$row['ytid']." ORDER BY v.vdid DESC LIMIT 50");
	while($v = mysql_fetch_array($vd)){
		$div = $div."<div class=\"col-sm-12 linkvideo\"><a href=\"http://facetube.esy.es/watch.php?v=".$v['vdlabel']."\">
		<div class=\"col-sm-5\"><img class=\"img-responsive\" src=\"//i.ytimg.com/vi/".$v['vdlabel']."/mqdefault.jpg\"></div>
		<div calss=\"col-sm-7\"><h5 class=\"linktitulo\">".$v['vdtitulo']."</h5></div></a></div>";
	}
}
echo $div;
?>
